import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  /**课程评价 */
  {
    path: '/course-evaluation',
    name: 'course-evaluation',
    meta: { hidden: true },
    component: () => import('@/views/course-evaluation/index.vue')
  },
  /**课程订单通知 */
  {
    path: '/course-order-notice',
    name: 'course-order-notice',
    meta: { hidden: true },
    component: () => import('@/views/course-order-notice/index.vue')
  }
  // { path: '/:pathMatch(.*)*', name: 'NotMatch', redirect: '/', meta: { hidden: true } }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

router.beforeEach((to, from, next) => {
  // if (whiteList.includes(to.fullPath)) return next()
  next()
})

export const SetupRouter = {
  install: (app) => {
    app.use(router)
  }
}

export default router
